import chisel3._
import chisel3.util._


class Rom(data_width: Int) extends BlackBox {
  val io = IO(new Bundle {
    val clk = Input(Clock())
    val reset = Input(Bool())
    val addr = Input(UInt(data_width.W))
    val rdata = Output(UInt(data_width.W))  
  })
}


class Dut(data_width: Int) extends Module {
  val io = IO(new Bundle {
    val dut_addr = Input(UInt(data_width.W))
    val dut_rdata = Output(UInt(data_width.W))  
  })
 
  val rom = Module(new Rom(data_width))
  rom.io.clk := clock
  rom.io.reset := reset
  rom.io.addr := io.dut_addr
  io.dut_rdata := rom.io.rdata
}

 
object DutTest extends App {
  chisel3.Driver.execute(args, () => new Dut(64))
}
// Array("--target-dir","build")
